package com.example.recyclerimageload.recyclerview_refresh_load_more.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.example.recyclerimageload.R;

public class MoreActivity extends AppCompatActivity implements View.OnClickListener {

    private Button base;
    private Button wrapper;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_loadmore);


        base = ((Button) findViewById(R.id.btn_base));
        wrapper = ((Button) findViewById(R.id.btn_wrapper));

        base.setOnClickListener(this);
        wrapper.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Intent intent = null;
        switch (v.getId()) {
            case R.id.btn_base:
                intent = new Intent(this, LoadMoreActivity.class);
                break;

            case R.id.btn_wrapper:
                intent = new Intent(this, LoadMoreWrapperActivity.class);
                break;
            default:
                break;
        }

        if (intent != null) {
            startActivity(intent);
        }
    }
}
